home *** CD-ROM | disk | FTP | other *** search
-
-
-
- tttteeeexxxxggggeeeennnn((((3333GGGG)))) tttteeeexxxxggggeeeennnn((((3333GGGG))))
-
-
-
- NNNNAAAAMMMMEEEE
- tttteeeexxxxggggeeeennnn - specify automatic generation of texture coordinates
-
- FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee tttteeeexxxxggggeeeennnn((((ccccoooooooorrrrdddd,,,, mmmmooooddddeeee,,,, ppppaaaarrrraaaammmmssss))))
- iiiinnnntttteeeeggggeeeerrrr****4444 ccccoooooooorrrrdddd,,,, mmmmooooddddeeee
- rrrreeeeaaaallll ppppaaaarrrraaaammmmssss(((())))
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- _c_o_o_r_d Expects the name of the texture coordinate whose generation is
- to be defined, enabled, or disabled. One of:
-
- TTTTXXXXSSSS: The _s texture coordinate
-
- TTTTXXXXTTTT: The _t texture coordinate
-
- TTTTXXXXRRRR: The _r texture coordinate
-
- TTTTXXXXQQQQ: The _q texture coordinate
-
- _m_o_d_e Expects the mode of generation to be specified, or an indication
- that generation is to be either enabled or disabled. One of the
- symbolic constants:
-
- TTTTGGGGCCCCOOOONNNNTTTT: Use the plane equation specified in _p_a_r_a_m_s to define a
- plane in eye-coordinates. Generate a texture coordinate that is
- proportional to vertex distance from this plane.
-
- TTTTGGGGLLLLIIIINNNNEEEE: Use the plane equation specified in params to define a
- plane in object-coordinates. Generate a texture coordinate that
- is proportional to vertex distance from this plane.
-
- TTTTGGGGSSSSPPPPHHHHEEEE: Generate texture coordinates based on the vertex and
- current normal. When used with the appropriate texture
- (described below), this gives the appearance of the reflection
- of an environment placed at infinity. Typically, both TTTTXXXXSSSS or
- TTTTXXXXTTTT are enabled.
-
- TTTTGGGGOOOONNNN: Enable the (previously defined) replacement for the
- specified texture coordinate.
-
- TTTTGGGGOOOOFFFFFFFF: Disable replacement of the specified texture coordinate
- (the default).
-
- _p_a_r_a_m_s Expects a 4-component plane equation when _m_o_d_e is TTTTGGGGCCCCOOOONNNNTTTT or
- TTTTGGGGLLLLIIIINNNNEEEE. Array element 1 is plane equation component A, 2 is B,
- 3 is C, and 4 is D. The specified contents of _p_a_r_a_m_s are
- insignificant when _m_o_d_e is TTTTGGGGOOOONNNN, TTTTGGGGOOOOFFFFFFFF, or TTTTGGGGSSSSPPPPHHHHEEEE.
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- tttteeeexxxxggggeeeennnn((((3333GGGG)))) tttteeeexxxxggggeeeennnn((((3333GGGG))))
-
-
-
- DESCRIPTION
- Texture coordinates _s, _t, _r, and _q can be specified directly using the tttt
- command. It is also possible to have texture coordinates generated
- automatically as a function of object geometry. tttteeeexxxxggggeeeennnn specifies,
- enables, and disables such automatic generation. Either or both texture
- coordinates can be generated independently. Automatic texture coordinate
- generation is disabled by default.
-
- tttteeeexxxxggggeeeennnn supports three generation algorithms: TTTTGGGGLLLLIIIINNNNEEEE, TTTTGGGGCCCCOOOONNNNTTTT, and TTTTGGGGSSSSPPPPHHHHEEEE.
- TTTTGGGGLLLLIIIINNNNEEEE operates directly on object coordinates, and is therefore most
- useful for textures that are locked to objects, such as ground texture
- locked to a terain, or metalic texture locked to a cylinder. TTTTGGGGCCCCOOOONNNNTTTT
- operates on eye-coordinates. It supports motion of an object through a
- `field' of texture coordinates. TTTTGGGGSSSSPPPPHHHHEEEE computes a reflection based on
- the vertex and normal in eye-coordinates.
-
- Both modes TTTTGGGGLLLLIIIINNNNEEEE and TTTTGGGGCCCCOOOONNNNTTTT define a texture coordinate generation
- function that is a linear function of distance from a plane. The plane
- equation is specified as a single, 4-component, vector in object
- coordinates.
-
-
- Pobject = |||| dcba ||||
- The TTTTGGGGLLLLIIIINNNNEEEE plane equation remains in object-coordinates. The TTTTGGGGCCCCOOOONNNNTTTT
- plane equation is transformed by the ModelView matrix into eye-
- coordinates when it is defined:
-
- Peye = MModelView-1 Pobject
- When a generation function has been defined for a texture coordinate, and
- tttteeeexxxxggggeeeennnn has been called with TTTTGGGGOOOONNNN, each vertex presented to the graphics
- system has that texture coordinate value replaced with the distance of
- the vertex from the defined plane. For example, when texture coordinate
- _s is generated by a TTTTGGGGLLLLIIIINNNNEEEE function, the generation function is:
-
-
- s = Vobject.Pobject = || xobject, yobject, zobject, wobject||.|||| dcba ||||
- Alternately, when _t is generated by a TTTTGGGGCCCCOOOONNNNTTTT function, the generation
- function is:
-
- t = Veye.Peye
- where
-
- Veye = Vobject MModelView,
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- tttteeeexxxxggggeeeennnn((((3333GGGG)))) tttteeeexxxxggggeeeennnn((((3333GGGG))))
-
-
-
- and
-
- Peye = MModelView-1 Pobject
- Note that the ModelView matrix that modifies the plane equation is the
- ModelView matrix in effect when tttteeeexxxxggggeeeennnn was called, while the ModelView
- matrix that modifies the vertex coordinates is the matrix used to
- transform that vertex.
-
- The creation of an appropriate texture for TTTTGGGGSSSSPPPPHHHHEEEE requires some
- explanation. Consider a unit sphere centered at the viewpoint which
- represents the complete environment. The mapping of this sphere to a 2D
- texture is captured with a formula, given below.
-
- Let _R be an arbitrary unit vector based at the viewpoint. _s and _t are
- texture coordinates in the range 0.0 to 1.0. The texture value is taken
- from the point of intersection between _R and the unit sphere. The set of
- all possible values of _R captures the complete environment. The mapping
- from _R to texture coordinates _s and _t is:
-
- mag = 2*sqrt(R.x*R.x+R.y*R.y+(R.z+1)*(R.z+1))
-
- s = R.x/mag+.5
-
- t = R.y/mag+.5
-
- The point in the environment directly behind the viewer maps to _s = .5, _t
- = .5. The intersection between the plane _z = 0 and the environment maps
- to a circle centered at _s = .5, _t = .5 with a radius of sqrt(2)/4. The
- point in the environment directly in front of the viewer maps to a circle
- with a radius of .5. This circle marks the boundary of the complete
- environment in the texture. In a reflection, this boundary can be
- approached but not reached. Since the view direction is fixed for each
- environment texture, a change in the view direction will require a new
- texture to be calculated.
-
- tttteeeexxxxggggeeeennnn generation functions remain valid until they are redefined. They
- are enabled and disabled without redefinition by calls to tttteeeexxxxggggeeeennnn with
- modes TTTTGGGGOOOONNNN and TTTTGGGGOOOOFFFFFFFF. tttteeeexxxxggggeeeennnn definition has no effect on the enable mode
- of the texture generation function.
-
- When enabled, tttteeeexxxxggggeeeennnn replaces _s, _t, or both each time a vertex command is
- received. A texture coordinate that is not being generated continues to
- be specified by tttt commands. Texture coordinate are transformed by the
- Texture matrix (see mmmmmmmmooooddddeeee) following coordinate replacement by tttteeeexxxxggggeeeennnn.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- mmode, n, t, texdef, texbin, tevdef, tevbin, v
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- tttteeeexxxxggggeeeennnn((((3333GGGG)))) tttteeeexxxxggggeeeennnn((((3333GGGG))))
-
-
-
- NOTES
- IRIS-4D G, GT, and GTX models, and the Personal Iris, do not support
- texture mapping. tttteeeexxxxggggeeeennnn is ignored by these machines. The Iris Indy,
- Indigo Entry, and XL support texture mapping except for lines. IRIS-4D
- VGX and VGXT models, the Personal Iris, Indy, Indigo Entry, XS, XS24, XZ,
- Elan and Extreme systems do not support TTTTXXXXRRRR and TTTTXXXXQQQQ Use ggggeeeettttggggddddeeee to
- determine whether texture mapping is supported.
-
- tttteeeexxxxggggeeeennnn cannot be used while mmmmmmmmooooddddeeee is MMMMSSSSIIIINNNNGGGGLLLL.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-